-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I18N: Annotate literals in advisory command #1161
Conversation
The comment is extracted by "xgettext -c" and placed to gettext catalogs. It helps the translators not know which words not to translate: #. Note for translators: "critical" etc. quoted words are #. literals that should not be translated. #: commands/advisory/arguments.hpp:155 msgid "" "Limit to packages in advisories with specified severity. List option. Can be " "\"critical\", \"important\", \"moderate\", \"low\", \"none\"." msgstr "" Fixes: rpm-software-management#1159
056b4ce
to
69120f9
Compare
How about making them placeholders |
LGTM |
Removing the literals from the message and substituting them dynamically would be bad because:
|
@@ -150,6 +150,8 @@ class AdvisorySeverityOption : public libdnf5::cli::session::AppendStringListOpt | |||
command, | |||
"advisory-severities", | |||
'\0', | |||
/* Note for translators: "critical" etc. quoted words are | |||
literals that should not be translated. */ | |||
_("Limit to packages in advisories with specified severity. List option. Can be " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am curios whether we should use C_()
to add a context for translators instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translation contexts are for distinguishing two identical messages for a need of different translations. This is not the case. This message only exists at two places dnf5/commands/advisory_shared.hpp and dnf5daemon-client/commands/advisory/arguments.hpp. The messages has the same meaning and use (their code and method name is actually a duplicate), so no artificial context is needed here.
98c8612
The comment is extracted by "xgettext -c" and placed to gettext catalogs. It helps the translators not know which words not to translate:
Fixes: #1159